﻿@using Lib.core;
@using Lib.helper;

@using Lib.model;
@using Bll;
@using Model;
@using Hiwjcn.Core.Model.Sys;
@{
    Layout = null;
    var list = ViewData["list"] as List<ReqLogGroupModel>;
}

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!-- header page -->
    @Html.Partial(IncludePath("header"))
</head>

<body>
    @Html.Partial(IncludePath("body_top"))
    @Html.Partial(IncludePath("manage_nav"))

    <div class="container-fluid">

        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    @if (ValidateHelper.IsPlumpList(list))
                    {
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <td>区域</td>
                                    <td>控制器</td>
                                    <td>Action</td>
                                    <td>耗时（m）</td>
                                    <td>次数</td>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach (var model in list)
                                {
                                    <tr>
                                        <td>@(model.AreaName)</td>
                                        <td>@(model.ControllerName)</td>
                                        <td>@(model.ActionName)</td>
                                        <td>
                                            @if (model.ReqTime > 1)
                                            {
                                                <span style="color:red;">@(model.ReqTime)</span> 
                                            }
                                            else
                                            {
                                                <span>@(model.ReqTime)</span> 
                                            }
                                        </td>
                                        <td>@(model.ReqCount)</td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    }
                </div>
            </div>
        </div>

    </div>
    @Html.Partial(IncludePath("body_bottom"))
</body>
</html>
